Translation updater bot [Mon, 5 Sep 2016 20:02:17 +0000 (22:02 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: Id463a0ad9b2690bdcbd598605ec4b1a8e031ac48
jenkins-bot [Mon, 5 Sep 2016 19:04:53 +0000 (19:04 +0000)]
Merge "Rename some variables in DatabaseMysqlBase"
jenkins-bot [Mon, 5 Sep 2016 19:01:08 +0000 (19:01 +0000)]
Merge "Remove unused DB position values in LoadBalancer"
jenkins-bot [Mon, 5 Sep 2016 12:10:24 +0000 (12:10 +0000)]
Merge "resourceloader: Make cache-eval in mw.loader.work asynchronous"
jenkins-bot [Mon, 5 Sep 2016 08:52:54 +0000 (08:52 +0000)]
Merge "Make statsd sampling rates configurable"
jenkins-bot [Mon, 5 Sep 2016 08:24:20 +0000 (08:24 +0000)]
Merge "Rename some DB/LB variables to be more consistent"
jenkins-bot [Mon, 5 Sep 2016 08:20:31 +0000 (08:20 +0000)]
Merge "Fix IDEA error in prepareQuickTemplate() call"
jenkins-bot [Mon, 5 Sep 2016 08:17:33 +0000 (08:17 +0000)]
Merge "Clean array() syntax in docs, part V"
jenkins-bot [Mon, 5 Sep 2016 06:14:45 +0000 (06:14 +0000)]
Merge "Typo in a test: '+' instead of '.' to concatenate strings"
Aaron Schulz [Fri, 2 Sep 2016 07:30:26 +0000 (00:30 -0700)]
Cache revision lookups done by Parser
Inverse flame graphs shows revision lookups as one of the
big three queries (Revision, LinkCache, getTitleInfo of
ResourceLoaderWikiModule).
This works via a new Revision::newKnownCurrent() method
needs both page/rev ID from the DB (to avoid invalidation)
and fetches the user name and rev_deleted if needed (again
to avoid invalidation). Parser does not care about fields
anyway in the template path.
Also improved cross-wiki support a bit, and fixed up some
docs and IDEA errors.
Change-Id: Icad602dba5de18c7758b77fd23b0a450ff21d09f
Amir Sarabadani [Sun, 4 Sep 2016 22:14:26 +0000 (02:44 +0430)]
Clean array() syntax in docs, part V
Change-Id: Ic65b7b2f1c2396246a3825c8d06d42bd6d06c37e
Translation updater bot [Sun, 4 Sep 2016 19:56:54 +0000 (21:56 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: Ib2530497c22f021d77f3838f9b1b6d3043cc51bc
umherirrender [Sat, 25 Jun 2016 20:24:42 +0000 (22:24 +0200)]
Added a Database::buildStringCast and use on int/string join
The database specific sql is untested, but sql is taken from docs
mssql - knows about impilict casts -
https://technet.microsoft.com/en-us/library/ms191530(v=sql.105).aspx
mysql - knows about impilict casts
oracle - https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqlj33562.html
postgresql -
https://www.postgresql.org/docs/9.2/static/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS
sqlite - http://www.sqlite.org/lang_expr.html
Bug: T69065
Change-Id: I3a83276dc65aae58124460af1810d37dff52e943
jenkins-bot [Sat, 3 Sep 2016 23:08:37 +0000 (23:08 +0000)]
Merge "RevertAction: Prevent file revert if current version is identical"
Aaron Schulz [Sat, 3 Sep 2016 22:06:59 +0000 (15:06 -0700)]
Rename some variables in DatabaseMysqlBase
Positions may be MariaDB GTIDs, which can even be kept in sync
in master/master Galera setups.
See https://mariadb.com/kb/en/mariadb/gtid/
Change-Id: I3dc80ae099d0849e57a7278d662317da362ff8fc
Aaron Schulz [Sat, 3 Sep 2016 21:58:38 +0000 (14:58 -0700)]
Remove unused DB position values in LoadBalancer
Also fixed IDEA error about useless $conn declaration.
Change-Id: I73572cb201e44db45fbe9bdb8e06bff4b50cecb2
Aaron Schulz [Sat, 3 Sep 2016 21:55:39 +0000 (14:55 -0700)]
Rename some DB/LB variables to be more consistent
Change-Id: I21de9c972402144159b7b2fc824533f8cefb03e7
Translation updater bot [Sat, 3 Sep 2016 21:50:07 +0000 (23:50 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: Ib9a3add2d9502cfa52a9a464b92c21633028cca0
jenkins-bot [Sat, 3 Sep 2016 21:34:11 +0000 (21:34 +0000)]
Merge "Make replication DB-related comments/messages more uniform"
jenkins-bot [Sat, 3 Sep 2016 18:54:57 +0000 (18:54 +0000)]
Merge "OutputPage: Ensure setupSkinUserCss() always applies to headElement()"
Aaron Schulz [Sat, 3 Sep 2016 18:45:54 +0000 (11:45 -0700)]
Fix IDEA error in prepareQuickTemplate() call
Change-Id: I5ee3424c55a499296bfd417ed1eda49a06d2c3f9
Timo Tijhof [Tue, 30 Aug 2016 23:36:28 +0000 (16:36 -0700)]
OutputPage: Ensure setupSkinUserCss() always applies to headElement()
Follows-up
80e5b160e0, which had to move this call out of the
headElement() and buildCssLinks() methods as it was no longer
allowed to modify the module queue after it was created.
It was moved to OutputPage::output(), right before Skin::outputPage()
is called, which ends up calling headElement().
The point in time was effectively unchanged for page views.
However for the caller in ApiParse() this meant setupSkinUserCss()
no longer got called at all as it never calls output(), but instead
calls headElement() directly.
Move it to getRlClient(), which is where we set all other
OutputPage-specific things relating to module loading already.
* For page views this has no impact.
* For ApiParse it means headElement(), which calls getRlClient(),
will once again include skin stylesheets.
Bug: T144301
Change-Id: I5fd4a27fb2d70b98ce9161dc050788d8ac364110
Seb35 [Sat, 3 Sep 2016 14:29:13 +0000 (16:29 +0200)]
Typo in a test: '+' instead of '.' to concatenate strings
I found it by executing tests with PHP 7.1.0RC1, but even
if PHP 7.1.0 is still a RC, this is a typo in PHP language.
Change-Id: Ia97f881f8c80a23c51512189d9ca5a012612c532
Aaron Schulz [Sat, 3 Sep 2016 14:13:47 +0000 (07:13 -0700)]
Make replication DB-related comments/messages more uniform
Change-Id: If04254aad085c05d2a6b6588b4c9b55a1736110d
jenkins-bot [Fri, 2 Sep 2016 23:56:26 +0000 (23:56 +0000)]
Merge "resourceloader: Shorten cache expiry if 'version' query doesn't match"
Timo Tijhof [Fri, 2 Sep 2016 22:44:59 +0000 (15:44 -0700)]
resourceloader: Shorten cache expiry if 'version' query doesn't match
Versioned load.php requests (load.php?modules=..&version=..) are highly
cacheable due to being versioned. When a module changes, the startup module
delivers new metadata to the client which naturally results in a cache miss
by producing a different url.
However, during upgrades and other deployments it was possible for a
multi-server installation to pollute edge caches with outdated content
in the following scenario:
* Deployment starts for an upgrade from version A to version B.
* Server 1 (on version B) gets a request for the startup manifest.
Client receives new manifest with version B information
and makes a versioned request for version B.
* Server 2 (still on version A) responds to this request with the
version it has (which is version A).
* Edge cache will store version A under the new url for version B.
This commit changes the last point by setting a low max-age when a request
has a 'version' hash mismatch.
Test plan:
* Look for a request in your browser like:
'/load.php?..modules=jquery%2Cmediawiki..&version=..'
* Verify it has a high Cache-Control max-age.
* Manipulate the 'version' parameter and verify it gets a low max-age.
Bug: T117587
Change-Id: Iba89c09b7b71d9fd2a8ff3ebe2618e26ea9daddf
Aaron Schulz [Fri, 2 Sep 2016 22:59:52 +0000 (15:59 -0700)]
Use WAN cache adaptiveTTL() method in FileBackendStore
Change-Id: I2e8b4e85b12c8892e8640abc63ee13b4b170645d
jenkins-bot [Fri, 2 Sep 2016 22:12:32 +0000 (22:12 +0000)]
Merge "Fix deletion handling of rev_deleted"
jenkins-bot [Fri, 2 Sep 2016 22:10:17 +0000 (22:10 +0000)]
Merge "Convert Revision::fetchFromConds() to using more modern selectRow()"
Aaron Schulz [Thu, 1 Sep 2016 12:42:01 +0000 (05:42 -0700)]
Fix deletion handling of rev_deleted
When the suppress button was not used, and some live
revisions had rev_deleted set, the query would try to
write the literal string "rev_deleted" as rev_deleted,
which was not noticed in default non-strict MySQL and
was casted to 0.
Follow-up to
673371e2c7
Bug: T144484
Change-Id: If3a74de13ea841d9d94ae05532cc8dadb0e40867
Aaron Schulz [Fri, 2 Sep 2016 13:46:56 +0000 (06:46 -0700)]
Convert Revision::fetchFromConds() to using more modern selectRow()
Change-Id: Icb3fa46beb7f49a43ffa40eb8f505a3717cd730b
jenkins-bot [Fri, 2 Sep 2016 21:02:13 +0000 (21:02 +0000)]
Merge "Rename CSS files for printing to a consistent file name"
Translation updater bot [Fri, 2 Sep 2016 20:15:53 +0000 (22:15 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I22dc4d60a502074f810a7ef5b704dd7bda05801f
jenkins-bot [Fri, 2 Sep 2016 19:59:58 +0000 (19:59 +0000)]
Merge "mw.Upload.BookletLayout: Use 'amenableparser' to handle templates in error messages"
jenkins-bot [Fri, 2 Sep 2016 18:27:22 +0000 (18:27 +0000)]
Merge "Add flushReplicaSnapshots() method for just clearing snapshots"
Chad Horohoe [Fri, 2 Sep 2016 18:15:02 +0000 (11:15 -0700)]
Don't mention $wgUser, it's ugly and it messes my grep-fu
Change-Id: Ic2b181a9f22f172aa8845a2e13bafa6142469ec4
Aaron Schulz [Fri, 2 Sep 2016 18:06:56 +0000 (11:06 -0700)]
Add flushReplicaSnapshots() method for just clearing snapshots
This is better than having to use the less safe commitAll(),
which also checks and commits masters with writes.
Change-Id: I01c95f1ebae6927ed5acf0c23dd19b5c2413f661
jenkins-bot [Fri, 2 Sep 2016 18:00:26 +0000 (18:00 +0000)]
Merge "Remove spammy reuseConnection() wfDebug() call"
jenkins-bot [Fri, 2 Sep 2016 17:48:28 +0000 (17:48 +0000)]
Merge "Clean up user handling in UploadStash"
Chad Horohoe [Fri, 2 Sep 2016 17:18:12 +0000 (10:18 -0700)]
Clean up user handling in UploadStash
- User parameter is now *required*, remove $wgUser fallback
- We don't actually need the object after construction, don't store it
Change-Id: Id0cc859b70e5d0608ffbfa591bce6a1feb7cc3be
jenkins-bot [Fri, 2 Sep 2016 17:40:33 +0000 (17:40 +0000)]
Merge "Let a few unit tests actually be unit tests"
Chad Horohoe [Fri, 2 Sep 2016 17:16:06 +0000 (10:16 -0700)]
Let a few unit tests actually be unit tests
MediaWikiTestCase is a terrible terrible thing with dumb overhead
Change-Id: I2a73a0f2819ed7e73b57642b7969036c2db2c991
jenkins-bot [Fri, 2 Sep 2016 17:08:38 +0000 (17:08 +0000)]
Merge "Make insertSelect() do two separate queries in non-CLI mode"
jenkins-bot [Fri, 2 Sep 2016 16:56:19 +0000 (16:56 +0000)]
Merge "Replace DataUpdate::doUpdates() callers in maintenance/"
Fomafix [Fri, 2 Sep 2016 15:08:39 +0000 (17:08 +0200)]
Rename CSS files for printing to a consistent file name
Change-Id: I868ecee47ed224ec05b41361727c2c67aebc474d
Aaron Schulz [Fri, 2 Sep 2016 15:36:08 +0000 (08:36 -0700)]
Remove spammy reuseConnection() wfDebug() call
This does not convey anything helpful and spam up debug
comment and jenkins logs
Change-Id: I7d20d061db28da3ba268255ecd71687a1eefb835
Glaisher [Sun, 14 Aug 2016 06:32:00 +0000 (11:32 +0500)]
Special:MovePage: Use LinkBatch when constructing subpages
Should help with T141029 and other cases, in general.
Bug: T141029
Change-Id: Iacda5acb0c569aa85eb328144c0af8d2cd07f126
Bartosz Dziewoński [Thu, 1 Sep 2016 21:49:19 +0000 (23:49 +0200)]
RevertAction: Prevent file revert if current version is identical
There are several reasons for this:
* The file thumbnail shown on the main file page is cached by the
browser, as images tend to be. This often confuses users into
thinking their revert did not work, and into attempting it again.
Recent examples:
* https://commons.wikimedia.org/wiki/Commons:Village_pump/Archive/2016/07#Wrong_SVG_rendering_on_File:DuckDuckGo_logo_and_wordmark.svg
* https://commons.wikimedia.org/w/index.php?title=Commons:Upload_help&oldid=
205348523#Reversion_is_not_working_for_me.
Ideally we'd prevent the caching, but preventing repeated reverts
should also work.
* Refreshing the success page causes the revert to be attempted again
(T53383). The usual solution to this is the Post/Redirect/Get
pattern, but we want to show a success message so that would require
some more changes (something similar to the post-edit notification).
* It can serve as a "revert conflict" detection mechanism, crude but
better than none.
In the unlikely case that uploading an identical older version of
the file is necessary, it can still be done using Special:Upload.
Bug: T53383
Change-Id: I37e04a536c5c2fc6cdbe59f6f598bb0c7f25d7a7
Glaisher [Sat, 13 Aug 2016 12:02:03 +0000 (17:02 +0500)]
LogPager: Use normalized value for log_user_text in query condition
Bug: T142755
Change-Id: Ia08be456cafa2133e5ea0e521161d6939e839fb2
jenkins-bot [Fri, 2 Sep 2016 04:48:35 +0000 (04:48 +0000)]
Merge "Make DeferredUpdates able to run DataUpdates"
jenkins-bot [Fri, 2 Sep 2016 04:43:41 +0000 (04:43 +0000)]
Merge "ImageHistoryList: Remove 'wpEditToken' parameter from the "revert" link for files"
Aaron Schulz [Fri, 2 Sep 2016 04:30:34 +0000 (21:30 -0700)]
Replace DataUpdate::doUpdates() callers in maintenance/
Change-Id: I51df9f419d6ea1e822fd0eef8c5dc4c43f9855e1
Aaron Schulz [Sun, 28 Aug 2016 16:23:52 +0000 (09:23 -0700)]
Make DeferredUpdates able to run DataUpdates
* Also make ErrorPageError exceptions display themselves
in PRESEND mode. Before they were always suppressed.
* Make DataUpdate::runUpdates() simply wrap
DeferredUpdates::execute().
* Remove unused installDBListener() method, which was
basically moved to Maintenance.
* Enable DBO_TRX for DeferredUpdates::execute() in CLI mode
* Also perform sub-DeferrableUpdate jobs right after their
parent for better transaction locality.
* Made rollbackMasterChangesAndLog() clear all master
transactions/rounds, even if there are no changes yet.
This keeps the state cleaner for continuing.
* For sanity, avoid calling acquirePageLock() in link updates
unless the transaction ticket is set. These locks are
already redundant and weaker in range than the locks the
Job classes that run them get. This helps guard against
DBTransactionError.
* Renamed $type to $stage to be more clear about the order.
Change-Id: I1e90b56cc80041d70fb9158ac4f027285ad0f2c9
Aaron Schulz [Thu, 1 Sep 2016 17:03:31 +0000 (10:03 -0700)]
Move run-on-add logic in DeferredUpdates to addUpdate()
Change-Id: I1b3ec21e07549f7250fa497f352fe1c131ddc88a
Aaron Schulz [Thu, 1 Sep 2016 17:01:25 +0000 (10:01 -0700)]
Remove $recursionGuard var from tryOpportunisticExecute()
Aside from there being no idle callback setting here, the
old addUpdate() code that runs updates allows nesting updates.
Make this support that for a few transitional commits. It will
be changed later to simply order the sub-updates after their
parent updates, keeping both outer scope for all updates and
locality of related updates.
Change-Id: I0ad4e9713a7893b981b7bb013e9db803eed663b2
Aaron Schulz [Thu, 1 Sep 2016 16:43:01 +0000 (09:43 -0700)]
Set "run when DBs idle" DeferredUpdates logic in Maintenance
* This is a more robust version of the one inside
DeferredUpdates (checking all DBs), which will be
replaced in a later commit.
* Make sure the listener is restored when the LB gets
torn down in tests. Also, it should respect the
$wgCommandLineMode value as tests can change it.
Change-Id: I1e3faa5a058df44e2d27ab5ac185930867eb68ac
Aaron Schulz [Thu, 1 Sep 2016 00:03:39 +0000 (17:03 -0700)]
Remove unused custom transaction logic from DataUpdate
Change-Id: Ife65e4e90a35395e87f4f487f1cb871b67d92aa1
Aaron Schulz [Thu, 1 Sep 2016 12:10:48 +0000 (05:10 -0700)]
Set some missing INTERNAL DB transaction flags and add wfWarn() calls
Make TRANSACTION_INTERNAL set mTrxAutomatic rather that
having callers have to do that individually.
The warnings should actually make tests fail with backtraces,
rather than often just having wrong things happen later.
Change-Id: Ic247a7b42a686f170f7abe6ec584459f3db4ed69
Bartosz Dziewoński [Thu, 1 Sep 2016 20:59:55 +0000 (22:59 +0200)]
ImageHistoryList: Remove 'wpEditToken' parameter from the "revert" link for files
The action=revert page does not use this parameter at all. (It displays
a form with an entirely different token.) I think this has not been
needed since
cf6dd13faca23af5b6e3188445b84e05d620d499 (r91284).
Change-Id: Ice5ecd2606a94a70321ede5304fee77fb1fb06c1
jenkins-bot [Thu, 1 Sep 2016 21:38:21 +0000 (21:38 +0000)]
Merge "objectcache: allow for callbacks to mask SYNC_WRITE latency"
Aaron Schulz [Mon, 29 Aug 2016 17:00:05 +0000 (10:00 -0700)]
objectcache: allow for callbacks to mask SYNC_WRITE latency
Change-Id: I908222ad3788ebe330aa58831cda139da32becd8
jenkins-bot [Thu, 1 Sep 2016 20:33:50 +0000 (20:33 +0000)]
Merge "Register a default value for the timecorrection preference"
Translation updater bot [Thu, 1 Sep 2016 20:08:52 +0000 (22:08 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: Ib4393e8374d2b6596a461934e7a5a0f15a88e292
jenkins-bot [Thu, 1 Sep 2016 18:59:55 +0000 (18:59 +0000)]
Merge "Remove SourceIndexField FLAG_SOURCE_DATA"
dcausse [Thu, 1 Sep 2016 15:00:59 +0000 (17:00 +0200)]
Remove SourceIndexField FLAG_SOURCE_DATA
Change-Id: I080f06a5a09f2d67a153b491555d0dbf65c626d0
jenkins-bot [Thu, 1 Sep 2016 14:51:41 +0000 (14:51 +0000)]
Merge "Add DEFAULTSORT to search index field data"
jenkins-bot [Thu, 1 Sep 2016 10:52:22 +0000 (10:52 +0000)]
Merge "mediawiki.util: Remove deprecated tooltipAccessKeyPrefix/tooltipAccessKeyRegexp"
jenkins-bot [Thu, 1 Sep 2016 06:45:00 +0000 (06:45 +0000)]
Merge "Use transaction listener to run DeferredUpdates in CLI mode"
jenkins-bot [Thu, 1 Sep 2016 06:42:46 +0000 (06:42 +0000)]
Merge "Add LoadBalancer::setTransactionListener()"
Aaron Schulz [Sun, 28 Aug 2016 16:06:57 +0000 (09:06 -0700)]
Use transaction listener to run DeferredUpdates in CLI mode
This sets triggers on master position waits typically called
after commitMasterChanges() or in commitAndWaitForReplication().
Change-Id: I127a8fe3cfc319abfa84fcd221ee2dae191c6d3b
Timo Tijhof [Sat, 27 Aug 2016 22:36:59 +0000 (15:36 -0700)]
mediawiki.util: Remove deprecated tooltipAccessKeyPrefix/tooltipAccessKeyRegexp
* Deprecated since MediaWiki 1.24.
* No longer used anywhere in Wikimedia Git.
* No longer used anywhere in MediaWiki-namespace on Wikimedia wikis.
Fixes performance issue uncovered in T144070. Would otherwise have
been addressed through a getter of sorts.
Change-Id: Ib323b7a63c5a2e8d36c5f105d0554a7216339b07
jenkins-bot [Thu, 1 Sep 2016 01:55:11 +0000 (01:55 +0000)]
Merge "Convert LocalFile to using getWithSetCallback() for caching"
jenkins-bot [Thu, 1 Sep 2016 01:11:19 +0000 (01:11 +0000)]
Merge "bidi-isolate usernames in Linker::userLink"
jenkins-bot [Thu, 1 Sep 2016 00:56:19 +0000 (00:56 +0000)]
Merge "ApiParamInfo: Allow fetching info for all submodules of a module"
Moriel Schottlender [Wed, 31 Aug 2016 20:58:05 +0000 (13:58 -0700)]
bidi-isolate usernames in Linker::userLink
Usernames can be in any script/language and include weak and neutral
characters like parentheses and dashes - these flip and make things
look very weird when displayed in the opposite directionality.
This fix adds <bdi> tags to isolate the username when we output user
links. This will affect displays like user personal tools, history
and diff view.
Also, fixing LogFormatterTestCase::removeSomeHtml() that expected
a very rigid html input (and thus failed with the new <bdi> wrapping)
to use strip_tags() instead.
Change-Id: I2db5f4b7d3a00726461eb6b699fbdf0ecd47a1cb
Aaron Schulz [Sun, 28 Aug 2016 15:56:17 +0000 (08:56 -0700)]
Add LoadBalancer::setTransactionListener()
This is useful for setting callbacks without making a new
DB connection. It also catches extra connections due to
foriegn wiki usage.
Change-Id: Ief009a0c1c2b4245fe3594fdf0d306dcc4956151
Aaron Schulz [Tue, 30 Aug 2016 06:22:22 +0000 (23:22 -0700)]
Convert LocalFile to using getWithSetCallback() for caching
Changed the hashing for the keys to SHA-1, which also avoids
problems with old MediaWiki versions seeing the new WAN
versioned keys.
Also fixed a few annoying IDEA errors
Change-Id: Ie608fb86421bc96e05e4a3b352f39b4938a243e4
Aaron Schulz [Wed, 31 Aug 2016 13:24:12 +0000 (06:24 -0700)]
Deprecate SqlDataUpdate
Core subclasses have been updated.
Change-Id: Ic1beebeb7aec2b40d89c75637968e57e71a6c1a2
jenkins-bot [Thu, 1 Sep 2016 00:25:09 +0000 (00:25 +0000)]
Merge "Links update class cleanups"
Aaron Schulz [Sat, 27 Aug 2016 17:10:46 +0000 (10:10 -0700)]
Make insertSelect() do two separate queries in non-CLI mode
This avoids slave lag and makes query time account easier.
It also avoids table-level autoinc locking and slave drift
with statement-based replication in some setups.
Also refactored the use of $wgCommandLine mode in
DatabaseBase slightly, so that it can be injected.
Change-Id: I2dba6024ecf32c9ee24a3080cce3b02568c1458b
Aaron Schulz [Wed, 31 Aug 2016 13:06:35 +0000 (06:06 -0700)]
Links update class cleanups
* Avoid using deprecated functions.
* Switch to DataUpdate as the direct parent class as
no benefit was provided from SqlDataUpdate (which
should be deprecated soon).
Change-Id: I0f1c77128f3df658e6a0eaf4471ca48ac536c643
jenkins-bot [Wed, 31 Aug 2016 23:44:01 +0000 (23:44 +0000)]
Merge "Improve beginMasterChanges and make methods for DeferredUpdates"
Aaron Schulz [Fri, 26 Aug 2016 07:19:34 +0000 (00:19 -0700)]
Improve beginMasterChanges and make methods for DeferredUpdates
* Fixed bug in LBFactory::beginMasterChanges where
untracked DBs that then get written to where not in the
transaction round. The call to onTransactionResolution()
right after commit() was also problematic, so a flag was
added to handle that.
* Add LBFactory::setWaitForReplicationListener(), which
fires at what is often a good point to run deferred updates.
* Add DatabaseBase::clearSnapshot() for committing no-op
transactions.
* Add IDatabase::setTransactionListener() for persistent
callbacks. Monitoring commits can be used to find a point
where deferred updates can run.
* Follow-up commit will address DeferredUpdates.
Change-Id: I4589e6f3ae40b1c362601416db48857fb89840bf
jenkins-bot [Wed, 31 Aug 2016 20:28:48 +0000 (20:28 +0000)]
Merge "Use wiki email for From of CC messages when $wgUserEmailUseReplyTo is set"
Bryan Davis [Sat, 13 Feb 2016 23:33:08 +0000 (16:33 -0700)]
Use wiki email for From of CC messages when $wgUserEmailUseReplyTo is set
Avoid bounces caused by SPF protections when sending CC messages to
users. This mirrors the logic used when sending the original message.
Change-Id: I1c48892e9b5086fd564eedd65cca6a848a2b425c
Translation updater bot [Wed, 31 Aug 2016 19:57:45 +0000 (21:57 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I94ec22fbff6255c613997c008e185def799495ad
jenkins-bot [Wed, 31 Aug 2016 19:41:05 +0000 (19:41 +0000)]
Merge "Enable jquery.ui.position on mobile"
Brad Jorsch [Wed, 31 Aug 2016 19:18:26 +0000 (15:18 -0400)]
ApiParamInfo: Allow fetching info for all submodules of a module
This allows fetching info for all query submodules with modules=query+*,
and info for all modules recursively with modules=main|main+**.
Bug: T28680
Change-Id: Icca5d2fda39d9d43fe20d77e34779412cec77aad
jenkins-bot [Wed, 31 Aug 2016 19:12:57 +0000 (19:12 +0000)]
Merge "ApiQueryAllDeletedRevisions: More namespace handling fixes"
jenkins-bot [Wed, 31 Aug 2016 17:53:20 +0000 (17:53 +0000)]
Merge "Always fail over to sync jobs when Special:RunJobs fails"
jenkins-bot [Wed, 31 Aug 2016 17:40:05 +0000 (17:40 +0000)]
Merge "Adapt the ParserOutput cache TTL when including special pages"
Brad Jorsch [Wed, 31 Aug 2016 17:19:13 +0000 (13:19 -0400)]
ApiQueryAllDeletedRevisions: More namespace handling fixes
* If the user specifically requests an empty list of namespaces, they
should get no pages.
* `ar_namespace` should always be in the query so MySQL can do a range
search instead of a full index scan.
* The example provided didn't match its description.
Bug: T89665
Change-Id: I91afc25db488f75c7f2b1ef343766b4bd7da5472
Aaron Schulz [Tue, 30 Aug 2016 19:35:08 +0000 (12:35 -0700)]
Adapt the ParserOutput cache TTL when including special pages
For simple pages that transclude special pages, like user pages
including Special:PrefixIndex, the TTL is allowed to drop to 15
seconds if the page parses fast enough.
Bug: T139893
Change-Id: If41885ded648d68352fe3d06336d98aa0ab53966
jdlrobson [Wed, 31 Aug 2016 15:17:07 +0000 (08:17 -0700)]
Enable jquery.ui.position on mobile
Although this module is deprecated it appears to be used in isolation
from jquery.ui in key extensions such as Translate. To aid extensions
who need to transition away from it we should make this available on mobile.
This module does not appear to be loaded on startup and is the only
non-mobile targetted module used by the Translate extension so enabling
this will give us benefit.
This also fits in with the long term plan
of deprecating the targets field altogether.
Change-Id: Ib381b820c69832f9aa6fce01f5dae8b4f50d66fa
Aaron Schulz [Wed, 31 Aug 2016 12:24:02 +0000 (05:24 -0700)]
Always fail over to sync jobs when Special:RunJobs fails
This makes sure that jobs run one way or another.
Also made a few cleanups and improved the logging.
Change-Id: Ic2916099181ebeb5ae5143d444515db9ed13cee9
Sam Smith [Wed, 31 Aug 2016 10:46:02 +0000 (11:46 +0100)]
MediaWikiServices: Import NoSuchServiceException
NoSuchServiceException is in the MediaWiki\Services namespace. Since the
MediaWikiServices class is in the MediaWiki namespace, the
catch ( NoSuchServiceException $e )
line added in Ifc587d61 will fail to catch any exception.
Co-Author: Paladox <thomasmulhall410@yahoo.com>
Bug: T143974
Change-Id: I903336c85c0bb9fb259f475f37959136e2ff7eca
Aaron Schulz [Sun, 21 Aug 2016 21:53:55 +0000 (14:53 -0700)]
objectcache: add and use adaptiveTTL() method
* This better handles delayed/lost cache purges by
having lower TTLs for entries that often changes.
* Use this for foreign upload description page caches,
we purges are never received from the source wiki.
* Also use this for User and LocalFile cache TTLs.
* Also move the Database::getCacheSetOptions() call in
User *before* doing the queries, which is preferred.
* Fixed some IDEA errors too, like the undeclared
mApiBase field.
Change-Id: I70f8ebb29ac853c2a530d9eedb9e7facc1b7b710
jenkins-bot [Wed, 31 Aug 2016 01:53:58 +0000 (01:53 +0000)]
Merge "mw.loader: Use requestAnimationFrame for addEmbeddedCSS()"
jenkins-bot [Wed, 31 Aug 2016 01:52:31 +0000 (01:52 +0000)]
Merge "mw.loader: Make 'mwLoadEnd' less expensive with a single using()"
Timo Tijhof [Thu, 11 Aug 2016 01:39:30 +0000 (18:39 -0700)]
resourceloader: Make cache-eval in mw.loader.work asynchronous
* Add 'if !batch.length' in work() to avoid needless initialisation
of mw.loader.store(). work() can be called without anything in
the batch because using() will call enqueue() for any non-ready
modules in order to get a job callback. This will invoke
work() as side-effect but will have no work to do.
This was previously here but got moved in
488c5d9.
* Add 'if !implementations.length' to avoid needless scheduling
of an idle callback when none of the modules in the batch
are found in local storage (e.g. first view).
Bug: T142129
Change-Id: Icd39423aec35f25162d2443b1f0507f6f0c748a3